﻿// Copyright (c) Inossem. All rights reserved.
// Licensed under the LGPL-3.0 license. See LICENSE file in the project root for full license information.
using System;
using System.Activities.Presentation.Toolbox;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace DWF.Studio.RemoteCtrls
{
    /// <summary>
    /// 活动提示
    /// </summary>
    [ValueConversion(typeof(ToolboxItemWrapper), typeof(string))]
    public class ToolTipConvertor : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            ToolboxItemWrapper itemWrapper = value as ToolboxItemWrapper;

            if (itemWrapper != null)
            {
               return itemWrapper.DisplayName;
            }
            else
            {
                return null;
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return null;
        }
    }
}
